<extend name="Public/base"/>

<block name="body">
	<div class="main-title">
		<h2>微信设置</h2>
	</div>

	<div class="cf">
		<a class="btn" href="{:U('add')}">新 增</a>
	</div>

	<div class="data-table table-striped">
		<table>
			<thead>
				<tr>

					<th>ID</th>
					<th>标题</th>
					<th>类型</th>
                    <th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<notempty name="_list">
				<volist name="_list" id="rows">
					<tr>
						<td>{$rows['id']}</td>
						<td>{$rows['title']}</td>
						<td>
                            <if condition="$rows['type'] eq  1">
                                准确匹配
                                <elseif condition="$rows['type'] eq 2"/>
                                模糊匹配
                                <else />
                                不匹配
                            </if>
                        </td>
						<td>
                        <if condition="$rows['status'] eq 1">开启<else/>关闭</if>
                        </td>
						<td>
							<a title="编辑" href="{:U('edit?id='.$rows['id'])}">编辑</a>
							<a class="confirm ajax-get" title="删除" href="{:U('del?id='.$rows['id'])}">删除</a>
						</td>
					</tr>
				</volist>
				<else/>
				<td colspan="5" class="text-center"> aOh! 暂时还没有内容! </td>
				</notempty>
			</tbody>
		</table>
	</div>
</block>

<block name="script">
<script type="text/javascript">
    $(function() {
    	//点击排序
    	$('.list_sort').click(function(){
    		var url = $(this).attr('url');
    		var ids = $('.ids:checked');
    		var param = '';
    		if(ids.length > 0){
    			var str = new Array();
    			ids.each(function(){
    				str.push($(this).val());
    			});
    			param = str.join(',');
    		}

    		if(url != undefined && url != ''){
    			window.location.href = url + '/ids/' + param;
    		}
    	});
    });
</script>
</block>